package com.test.aop.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Order(1)
@Slf4j
@Component
@Aspect
public class AspectDemo4 {
    @Before("@annotation(com.test.aop.aspect.MyAspect)")
    public void doBefore(){
        log.info("AspectDemo4的doBefore");
    }

    @After("@annotation(com.test.aop.aspect.MyAspect)")
    public void doAfter(){
        log.info("AspectDemo4的doAfter");
    }
}
